﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Brain
{
    public class DefaultResourceManager : IResourceManager
    {
        public void DeserializedAll()
        {
        }
        protected List<IDisposable> Disposal { get; set; }

        public DefaultResourceManager()
        {
            Disposal = new List<IDisposable>();
        }

        public void HandleDisposal(IDisposable resource)
        {
            Disposal.Add(resource);
        }


        public void Reset()
        {
            for (int i = 0; i < Disposal.Count; i++)
            {
                IDisposable disp = Disposal[i];
                disp.Dispose();
            }
        }

        public SerializationData Data { get; set; }
        public void SerializeData(DefaultSerializationManager manager)
        {
        }

        public void DeserializeData(DefaultSerializationManager manager, SerializationData newData)
        {
        }
    }
}
